package main

import (
	"ginchat/router"
	"ginchat/service"
	"ginchat/utils"
	"github.com/gin-gonic/gin"
)

func main() {
	//test.TestDb()
	utils.InitConfig()

	utils.InitRedis()

	utils.InitMysqlDb()
	router.Router()

}

func kk() {
	r := gin.Default()
	r.GET("/ping", func(c *gin.Context) {
		c.JSON(200, gin.H{
			"message": "pong",
		})
	})
	r.GET("/index", service.GetIndex)
	err := r.Run("127.0.0.1:9808")
	if err != nil {
		return
	}
}
